package com.qianli.cashmama.trade.client.trade.request;

import com.fqgj.common.api.ParamsObject;
import com.fqgj.common.utils.CollectionUtils;
import com.fqgj.exception.common.ApplicationException;

import java.util.List;

/**
 * @program: cashmama-trade-center
 * @description
 * @author: frank
 * @create: 2020-02-23 19:25
 **/
public class QueryTradesRequest extends ParamsObject {

    private List<String> userCodes;

    public List<String> getUserCodes() {
        return userCodes;
    }

    public QueryTradesRequest setUserCodes(List<String> userCodes) {
        this.userCodes = userCodes;
        return this;
    }

    @Override
    public void validate() {
        if (CollectionUtils.isEmpty(userCodes)) {
            throw new ApplicationException("userCodes can not be empty");
        }
    }
}
